# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ruby-http_configuration
_gemname=${pkgname#ruby-}
pkgver=1.0.4
pkgrel=16
pkgdesc='Gem that provides the ability to set defaults for proxies and timeouts for Net::HTTP.'
arch=('any')
license=('MIT')
makedepends=('ruby')
url='http://github.com/bdurand/http_configuration'
source=("http://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
sha512sums=('184f59ca9d6f2556f61cb6033181583bf94c71258ababcaee2be9073a329179a6b63c8acefe543a9e8496816420fa3d048df9e1f0088d9d62bfa59dd45f3ba3e')

package() {
  _gemhome="$(gem env home)"

  gem install --ignore-dependencies --no-user-install --no-document \
    -i "$pkgdir/$_gemhome" -n "$pkgdir/usr/bin" "$_gemname-$pkgver.gem"
  
  rm "$pkgdir/$_gemhome/cache/$_gemname-$pkgver.gem"

  install -Dm 644 "$pkgdir/$_gemhome/gems/$_gemname-$pkgver/MIT-LICENSE" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

